//
//  myViewCell.m
//  BuffetNews
//
//  Created by weidawei on 14-10-29.
//  Copyright (c) 2014年 lanou3g.com 蓝鸥科技. All rights reserved.
//

#import "myViewCell.h"
#import "UIImageView+WebCache.h"
@implementation myViewCell

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        // Initialization code
        self.label1 = [[UILabel alloc] init];
        [self.contentView addSubview:self.label1];
        [_label1 release];
        
        self.label2 = [[UILabel alloc] init];
        [self.contentView addSubview:self.label2];
        [_label2 release];
        
        self.imageCell = [[UIImageView alloc] init];
        [self.contentView addSubview:self.imageCell];
        [_imageCell release];
        
        self.button = [UIButton buttonWithType:UIButtonTypeSystem];
        [self.contentView addSubview:self.button];
        
//        self.iamgeLoge = [[UIImageView alloc] init];
//        [self.contentView addSubview:self.iamgeLoge];
//        [_imageCell release];
        
    }
    return self;
}

- (void)dealloc
{
    [_imageCell release];
    [_label2 release];
    [_label1 release];
    [super dealloc];
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    CGFloat width  = self.contentView.frame.size.width;
    CGFloat height = self.contentView.frame.size.height;
    self.imageCell.frame = CGRectMake(0, 0, width / 5, height);
    self.label1.frame = CGRectMake(width / 5, 0, width , height / 2);
    self.label2.frame = CGRectMake(width / 5, height / 2, width , height / 2);
    self.button.frame = CGRectMake(0, 0, width / 5, height);
//    self.iamgeLoge.frame = self.contentView.frame;
//    self.imageCell.frame = self.button.frame;
//    self.imageCell.backgroundColor = [UIColor redColor];
    
//    self.label1.text = self.mode.title;
//    self.label2.text = self.mode.stitle;
//    [self.imageCell sd_setImageWithURL:[NSURL URLWithString:self.mode.img]];
}

- (void)awakeFromNib
{
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
